3.604 \(\int \frac {-1+2 x^2}{\sqrt {-1+x} \sqrt {1+x}} \, dx\)

Optimal. Leaf size=16 \[ \sqrt {x-1} x \sqrt {x+1} \]

[Out]

x*(-1+x)^(1/2)*(1+x)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {384} \[ \sqrt {x-1} x \sqrt {x+1} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + 2*x^2)/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

Sqrt[-1 + x]*x*Sqrt[1 + x]

Rule 384

Int[((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symb
ol] :> Simp[(c*x*(a1 + b1*x^(n/2))^(p + 1)*(a2 + b2*x^(n/2))^(p + 1))/(a1*a2), x] /; FreeQ[{a1, b1, a2, b2, c,
 d, n, p}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2, 0] && EqQ[a1*a2*d - b1*b2*c*(n*(p + 1) + 1), 0]

Rubi steps

\begin {align*} \int \frac {-1+2 x^2}{\sqrt {-1+x} \sqrt {1+x}} \, dx &=\sqrt {-1+x} x \sqrt {1+x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.09, size = 66, normalized size = 4.12 \[ \frac {\sqrt {x-1} \left (x \sqrt {1-x^2}-2 \sin ^{-1}\left (\frac {\sqrt {1-x}}{\sqrt {2}}\right )\right )}{\sqrt {1-x}}+2 \tanh ^{-1}\left (\sqrt {\frac {x-1}{x+1}}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(-1 + 2*x^2)/(Sqrt[-1 + x]*Sqrt[1 + x]),x]

[Out]

(Sqrt[-1 + x]*(x*Sqrt[1 - x^2] - 2*ArcSin[Sqrt[1 - x]/Sqrt[2]]))/Sqrt[1 - x] + 2*ArcTanh[Sqrt[(-1 + x)/(1 + x)
]]

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 12, normalized size = 0.75 \[ \sqrt {x + 1} \sqrt {x - 1} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="fricas")

[Out]

sqrt(x + 1)*sqrt(x - 1)*x

________________________________________________________________________________________

giac [A]  time = 0.17, size = 12, normalized size = 0.75 \[ \sqrt {x + 1} \sqrt {x - 1} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="giac")

[Out]

sqrt(x + 1)*sqrt(x - 1)*x

________________________________________________________________________________________

maple [A]  time = 0.00, size = 13, normalized size = 0.81 \[ \sqrt {x -1}\, \sqrt {x +1}\, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2-1)/(x-1)^(1/2)/(x+1)^(1/2),x)

[Out]

x*(x-1)^(1/2)*(x+1)^(1/2)

________________________________________________________________________________________

maxima [C]  time = 0.43, size = 9, normalized size = 0.56 \[ \sqrt {x^{2} - 1} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-1)/(-1+x)^(1/2)/(1+x)^(1/2),x, algorithm="maxima")

[Out]

sqrt(x^2 - 1)*x

________________________________________________________________________________________

mupad [B]  time = 2.80, size = 16, normalized size = 1.00 \[ \frac {\left (x^2+x\right )\,\sqrt {x-1}}{\sqrt {x+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2 - 1)/((x - 1)^(1/2)*(x + 1)^(1/2)),x)

[Out]

((x + x^2)*(x - 1)^(1/2))/(x + 1)^(1/2)

________________________________________________________________________________________

sympy [C]  time = 43.48, size = 129, normalized size = 8.06 \[ - \begin {cases} 2 \operatorname {acosh}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )} & \text {for}\: \frac {\left |{x + 1}\right |}{2} > 1 \\- 2 i \operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )} & \text {otherwise} \end {cases} + \frac {{G_{6, 6}^{6, 2}\left (\begin {matrix} - \frac {3}{4}, - \frac {1}{4} & - \frac {1}{2}, - \frac {1}{2}, 0, 1 \\-1, - \frac {3}{4}, - \frac {1}{2}, - \frac {1}{4}, 0, 0 & \end {matrix} \middle | {\frac {1}{x^{2}}} \right )}}{2 \pi ^{\frac {3}{2}}} - \frac {i {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {3}{2}, - \frac {5}{4}, -1, - \frac {3}{4}, - \frac {1}{2}, 1 & \\- \frac {5}{4}, - \frac {3}{4} & - \frac {3}{2}, -1, -1, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{x^{2}}} \right )}}{2 \pi ^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-1)/(-1+x)**(1/2)/(1+x)**(1/2),x)

[Out]

-Piecewise((2*acosh(sqrt(2)*sqrt(x + 1)/2), Abs(x + 1)/2 > 1), (-2*I*asin(sqrt(2)*sqrt(x + 1)/2), True)) + mei
jerg(((-3/4, -1/4), (-1/2, -1/2, 0, 1)), ((-1, -3/4, -1/2, -1/4, 0, 0), ()), x**(-2))/(2*pi**(3/2)) - I*meijer
g(((-3/2, -5/4, -1, -3/4, -1/2, 1), ()), ((-5/4, -3/4), (-3/2, -1, -1, 0)), exp_polar(2*I*pi)/x**2)/(2*pi**(3/
2))

________________________________________________________________________________________